package org.marlin.http.http;

import com.alibaba.fastjson.JSON;

/**
 * init version 1.5.0
 * For X5 protocol
 *
 * @author Jack ZG
 * @since 1.0.0
 */
@Deprecated
public class X5Response<T> {
    private X5ResponseHeader header;
    private T body;

    public X5ResponseHeader getHeader() {
        return this.header;
    }

    public void setHeader(X5ResponseHeader header) {
        this.header = header;
    }

    public T getBody() {
        return this.body;
    }

    public void setBody(T body) {
        this.body = body;
    }


    public String toString() {
        return JSON.toJSONString(this);
    }

    public static class X5ResponseHeader {
        private Integer code;
        private String desc;
        private String location;

        public Integer getCode() {
            return this.code;
        }

        public void setCode(Integer code) {
            this.code = code;
        }

        public String getDesc() {
            return this.desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }

        public String getLocation() {
            return this.location;
        }

        public void setLocation(String location) {
            this.location = location;
        }
    }
}

